Skip to content

fix: Queue messages during conversation compaction#1546

Merged
charlesvien merged 6 commits intomainfrom
04-07-queue_messages_during_conversation_compaction
Apr 9, 2026
Merged

fix: Queue messages during conversation compaction#1546
charlesvien merged 6 commits intomainfrom
04-07-queue_messages_during_conversation_compaction

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 8, 2026

Problem

Messages sent during compaction bypass the queue and are lost because isCompacting was only a derived UI property, invisible to the service layer.

Closes #1272

Changes

  1. Add isCompacting state to AgentSession and gate sendPrompt on it
  2. Track compaction lifecycle via STATUS and COMPACT_BOUNDARY notifications in service
  3. Drain queued messages when compaction completes
  4. Replace all _posthog/ string literals with POSTHOG_NOTIFICATIONS constants
  5. Add isNotification() utility in agent package to handle potential double-prefix
  6. Remove duplicate isPosthogMethod helpers from renderer files

How did you test this?

Maually

@charlesvien charlesvien marked this pull request as ready for review April 8, 2026 02:49
@charlesvien charlesvien force-pushed the 04-07-queue_messages_during_conversation_compaction branch from 160431f to aa26669 Compare April 8, 2026 04:17
@charlesvien charlesvien force-pushed the 04-07-prevent_permission_request_from_stealing_focus_across_cells branch from 4cb808f to 1c97223 Compare April 8, 2026 04:17
@charlesvien charlesvien force-pushed the 04-07-queue_messages_during_conversation_compaction branch from c84c3a5 to c1f0e8c Compare April 8, 2026 22:55
@charlesvien charlesvien force-pushed the 04-07-prevent_permission_request_from_stealing_focus_across_cells branch from 1c97223 to 86e29b9 Compare April 8, 2026 22:56
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 8, 2026

Merge activity

  • Apr 8, 11:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 9, 12:02 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 9, 12:07 AM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-07-prevent_permission_request_from_stealing_focus_across_cells to graphite-base/1546 April 8, 2026 23:53
@charlesvien charlesvien changed the base branch from graphite-base/1546 to main April 9, 2026 00:00
@charlesvien charlesvien force-pushed the 04-07-queue_messages_during_conversation_compaction branch from c1f0e8c to 2e603ea Compare April 9, 2026 00:01
@charlesvien charlesvien merged commit 8c8b6a2 into main Apr 9, 2026
16 checks passed
@charlesvien charlesvien deleted the 04-07-queue_messages_during_conversation_compaction branch April 9, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sending a message during compaction does not work

2 participants